<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="./promise.js"></script>
    <script>
        let p = new Promise((resolve, reject) => {
            // resolve('ok')
            reject('err')
                // setTimeout(function () {
                //     // reject('err')
                //     resolve('ok')
                //     console.log(444);

                // }, 3000)
        })
        p
        .then(velue=>{
            console.log(velue)
        })
        .then(velue=>{
            console.log(velue)
        })
        .then(velue=>{
            console.log(velue)
        },reason=>{
            console.log(reason);
        }) 
        console.log(p);

    </script>
</body>

</html>